<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE HTML>
<html>
<head>
  <title>星火物流，电话0570-1234567，开户行：中国银行 欢迎加入星火物流网</title>
  <%@ include file="/common/meta.jsp" %>
  <link rel="stylesheet" href="${ctx}/css/zTreeStyle/zTreeStyle.css" type="text/css">
  <link rel="stylesheet" href="${ctx}/js/jq_plugins/light_box/light_box.css" type="text/css" />
</head>
<body>
<div id="container">
	<div id="header">
		<ul class="fn-clear">
			<li>
				<h1>星火物流</h1>
			</li>
			<li class="fn_show menuDisplay">
			    <a href="#" class="on">系统</a>
				<ul>
					<li><a href="#">登录</a></li>
					<li><a href="#">登录主页</a></li>
					<li><a href="#"  onclick="javascript:clearScreen();return false;">信息清除</a></li>
					<li><a href="${ctx}/j_spring_security_logout">退出系统</a></li>
				</ul>
			</li>
			<li class="menuDisplay">
			    <a href="#">设置</a>
				<ul class="w160">
					<li><a href="#"><label><input type="checkbox" checked="checked" onclick="showStatusMenu()">&nbsp;状态栏</label></a></li>
					
					<li>
					    <a href="#">
					      <s:if test="user.autoReceive==0">
					        <label><input type="checkbox" checked="checked" value="0" name="autoReceive" />&nbsp;自动下载当天信息</label>
					      </s:if>
					      <s:else>
					        <label><input type="checkbox" value="1" name="autoReceive"/>&nbsp;自动下载当天信息</label>
					      </s:else>
					    </a>
					</li>
					
				</ul>
			</li>
			<li><a href="#">帮助</a></li>
		</ul>
	</div>
	<div id="navi">
		<div class="naviBox">
			<div class="sad">
				<p>滚动文字广告栏或者幻灯片图片广告滚动文字广告栏或者幻灯片图片广告滚动文字广告栏或者幻灯片图片广告</p>
			</div>
			<ul class="inner fn-clear">
				<li><a href="#" class="radio radioon" data-tag="">全部</a></li>
				<li><a href="#" class="radio" data-tag="货源">货源</a></li>
				<li><a href="#" class="radio" data-tag="车源">车源</a></li>
				
				<li><a href="http://www.spark56.com" class="navibtn" target="_blank">首页</a></li>
				<li><a href="#" class="navibtn" id="">查询</a></li>
				<li><a href="#" class="navibtn" id="publishInfo">发布</a></li>
			</ul>
		</div>
	</div>
	<div id="main" class="fn-clear">
		<div id="rightBar" class="">
			<div class="inner">
				<h2><a href="#">城市选择</a></h2>
				<div class="csBox">
					<ul id="treeShow" class="ztree">
					</ul>
				</div>
			</div>
			<div class="inner2"><a href="#"></a></div>
		</div>
		<div id="conts">
			<div class="scrollDl topBox">
				<dl>
					<dt class="car">18123</dt>
					<dd>北京有朋友带来货了<span class="tel">54625202  13564284562  18017546258</span> <span class="time">2013-03-15 11:38:01</span></dd>
				</dl>
				<dl class="bgcolor">
					<dt class="goods">18123</dt>
					<dd>山东有朋友带来货了是打发第三方的法师打发第三方 <span class="tel">54625202  13564284562  18017546258</span> <span class="time">2013-03-15 11:38:01</span></dd>
				</dl>
			</div>
			<div class="bottomBox">
			<div class="filterBox" style="float:left;">
				<div class="fBox fn-clear">
					<div class="closex"><a href="#"></a></div>
					<ul class="fn-clear">
						<li class="filt"><a href="#">地区筛选</a></li>
						<li>手动输入:</li>
						<li><input type="text"></li>
						<li class="ruBox"><label><input type="radio" name="radio">&nbsp;内容查</label></li>
						<li class="ruBox"><label><input type="radio" name="radio">&nbsp;电话查询</label></li>
						<li class="ruBox"><label><input type="radio" name="radio">&nbsp;编号查</label></li>
						<li class="qc"><a href="#">清除保存</a></li>
					</ul>
				</div>
				<div class="sBox scrollDl">
					<dl>
						<dt class="car">18123</dt>
						<dd>北京有朋友带来货了<span class="tel">54625202  13564284562  18017546258</span> <span class="time">2013-03-15 11:38:01</span></dd>
					</dl>
					<dl class="bgcolor">
						<dt class="goods">18123</dt>
						<dd>山东有朋友带来货了是打发第三方的法师打发第三方 <span class="tel">54625202  13564284562  18017546258</span> <span class="time">2013-03-15 11:38:01</span></dd>
					</dl>
					<dl>
						<dt class="car">18123</dt>
						<dd>北京有朋友带来货了<span class="tel">54625202  13564284562  18017546258</span> <span>2013-03-15 11:38:01</span></dd>
					</dl>
					<dl class="bgcolor">
						<dt class="goods">18123</dt>
						<dd>山东有朋友带来货了是打发第三方的法师打发第三方 <span class="tel">54625202  13564284562  18017546258</span> <span class="time">2013-03-15 11:38:01</span></dd>
					</dl>
					<dl>
						<dt class="car">18123</dt>
						<dd>北京有朋友带来货了<span class="tel">54625202  13564284562  18017546258</span> <span>2013-03-15 11:38:01</span></dd>
					</dl>
					<dl class="bgcolor">
						<dt class="goods">18123</dt>
						<dd>山东有朋友带来货了是打发第三方的法师打发第三方 <span class="tel">54625202  13564284562  18017546258</span> <span class="time">2013-03-15 11:38:01</span></dd>
					</dl>
					<dl>
						<dt class="car">18123</dt>
						<dd>北京有朋友带来货了<span class="tel">54625202  13564284562  18017546258</span> <span>2013-03-15 11:38:01</span></dd>
					</dl>
					<dl class="bgcolor">
						<dt class="goods">18123</dt>
						<dd>山东有朋友带来货了是打发第三方的法师打发第三方 <span class="tel">54625202  13564284562  18017546258</span> <span class="time">2013-03-15 11:38:01</span></dd>
					</dl>
					<dl>
						<dt class="car">18123</dt>
						<dd>北京有朋友带来货了<span class="tel">54625202  13564284562  18017546258</span> <span>2013-03-15 11:38:01</span></dd>
					</dl>
					<dl class="bgcolor">
						<dt class="goods">18123</dt>
						<dd>山东有朋友带来货了是打发第三方的法师打发第三方 <span class="tel">54625202  13564284562  18017546258</span> <span class="time">2013-03-15 11:38:01</span></dd>
					</dl>
					<dl>
						<dt class="car">18123</dt>
						<dd>北京有朋友带来货了<span class="tel">54625202  13564284562  18017546258</span> <span>2013-03-15 11:38:01</span></dd>
					</dl>
					<dl class="bgcolor">
						<dt class="goods">18123</dt>
						<dd>山东有朋友带来货了是打发第三方的法师打发第三方 <span class="tel">54625202  13564284562  18017546258</span> <span class="time">2013-03-15 11:38:01</span></dd>
					</dl>
				</div>
			</div>
			
			</div>
		</div>
	</div>
	<div id="footer">
		<p><span>济南  |   42476   | 2165</span><span><strong>帐号到期提醒</strong>：天津  |  帐号到期时间 ${fn:substring(user.expiredTime,0,10)}</span> <span>|  在线人数：<strong>120354</strong> |</span></p>
	</div>
</div>

       <!-- 发布页面 -->
       <div id="publishPage" class="lightBox2">
         <a id='close_x' class='close sprited' href='#'>close</a>
         <p class='title'>发布页面</p>
         <iframe frameborder='0' width='100%' id="showPublishPage"></iframe>
       </div>


<!--[if lte IE 6]>
	<script type="text/javascript" src="js/MSIE.PNG.js"></script>
	<script type="text/javascript">
		fixPng("js/blank.gif");
	</script>
	<script type="text/javascript" src="js/DD_belatedPNG_0.0.8a-min.js"></script>
	<script type="text/javascript">
	DD_belatedPNG.fix('#container,h1,#header li a,');
	</script>
<![endif]-->

<script type="text/javascript" src="${ctx}/js/ztree/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript" src="${ctx}/js/ztree/jquery.ztree.excheck-3.5.js"></script>
<script type="text/javascript" src="${ctx}/js/jq_plugins/light_box/jquery.lightbox.js"></script>

<script type="text/javascript">

var SERACH={
   Citys:"上海",
   InfoType:"",
   AfterWhen:""
};

$(document).ready(function(){
	
	  showMainAll();
	  
	  $(".csBox").css("height",$("#conts").height()-43+"px");
	  
	  $.fn.zTree.init($("#treeShow"), setting, zNodes);
	  
	  receiveInfo();
	  
	  setTimeout(function()
			     {
		           receiveInfo();
		           $(".topBox").scrollTop(0);
		         },15000);
});

function receiveInfo()
{
  $.post("${ctx}/pro/search.action",SERACH,
	      function(response)
	      {
		     if(!response||!response.code)
		     {
		    	alert("no data"); return; 
		     }
		     if(response.code!=200)
	    	 {
	    	    alert(response.message); return ;
	    	 }
		     
		     var content="";
		     
		     var result=response.data;
		     
		     for(var i=0;i<result.length;i++)
	    	 {
		    	 content+="<dl>";
		    	 content+="<dt class=\""+(result[i].infoType=="车源"?"car":"goods")+"\">"+result[i].id+"</dt>";
		    	 content+="<dd>"+result[i].info+"<span class=\"tel\">"+result[i].phoneInfo+"</span> <span class=\"time\">"+result[i].createTime.substring(0,19)+"</span></dd>";
		    	 content+="</dl>";
	    	 }
		     $(".topBox").html(content);
		     $(".topBox dl[class='bgcolor']").removeClass("bgcolor");
		     $(".topBox dl:odd").addClass("bgcolor");
	      }
  );
}

$("#publishInfo").click(function(){
	
    $("#publishPage").lightbox_me({
		 onLoad: function()
		 {
		   $("#showPublishPage").attr("src","info");
		 },
		 onClose: function()
		 {
		   $("#showPublishPage").attr("src","about:blank");
		 }
   });	
	
	//$(".topBox").animate({scrollTop: $('.topBox').offset().top},50000);
});

$(":input[name='autoReceive']").click(function(){
	  $.post("${ctx}/pro/!autoReceive.action",{autoReceive:$(this).val()==0?1:0},
		      function(response)
		      {
			     if(!response||!response.code)
			     {
			    	alert("no data"); return; 
			     }
			     if(response.code!=200)
		    	 {
		    	    alert(response.message); return ;
		    	 }
			     alert("修改成功");
		      }
	  );
});

$(".menuDisplay").click(function(){
	$(this).find("ul").toggle();
})

$(".naviBox>ul>li>a[class*='radio']").click(function(){
	
	$(".naviBox>ul>li>a[class*='radioon']").removeClass("radioon");
	$(this).addClass("radioon");
	SERACH.InfoType=$(this).data("tag");
	receiveInfo();
});

function clearScreen()
{
	$(".topBox").empty();
}

var topSize=150,tailMenu=61,searchMain,searchBar=38;

//展示区域高度
var mainAll=$(window).height()-topSize-tailMenu;

function showMainAll()
{
   //隐藏searchBar
   $(".filterBox").hide();
   
   $(".topBox").css("height",mainAll+"px");
}

function showSearchBar()
{
   $(".filterBox").show();
   
   $(".filterBox").css("height",mainAll*0.4-searchBar+"px");
   
   $(".topBox").css("height",mainAll*0.6+"px");
}

function showStatusMenu()
{
	$("#footer").toggle();
	//$(i).find("span").toggle();
}

//加载右侧树 
var zNodes =$.evalJSON('${cityJson}');

var setting = {
		check: {
			enable: true,
			chkboxType: { "Y" : "", "N" : "" }
		},
		data: {
			simpleData: {
				enable: true
			}
		},
		callback: {
			onCheck: zTreeOnCheck
		},
		view: {
			showIcon: false
		}
	};

function zTreeOnCheck(event, treeId, treeNode) {
    //alert(treeNode.tId + ", " + treeNode.name + "," + treeNode.checked);
    
    var treeObj = $.fn.zTree.getZTreeObj("treeShow");
    var nodes = treeObj.getCheckedNodes(true);
    var _array=[];
    for(var node in nodes)
   	{
    	_array.push(nodes[node].name);
   	}
    
    if(_array.length==0)
    {
    	alert("尚未选择城市");
    	return;
    }
    
    SERACH.Citys=_array.join(",");
    receiveInfo();
    //
};

</script>

</body>
</html>